
package gs.eisenhower.swallet.factory;

import gs.eisenhower.swallet.model.Budget;
import gs.eisenhower.swallet.model.Category;
import gs.eisenhower.swallet.model.Entity;
import gs.eisenhower.swallet.model.Wallet;

/**
 * ModelClassFactory creates model class instances based on provided data.
 *  
 * @version 1.0 27 feb 2013
 * @author Stefan Godoroja
 */
@Deprecated
public class ModelFactory {
    
	private static final ModelFactory modelFactory = new ModelFactory();
	
	private ModelFactory() {}
	
	public static ModelFactory getInstance() {
	   	return modelFactory;
	}
	
	@Deprecated
	public Entity createModelInstance(Class<? extends Entity> entityChild) {
		if (entityChild.equals(Wallet.class)) {
			return new Wallet();
		} else if (entityChild.equals(Budget.class)) {
			return new Budget();
		} else if (entityChild.equals(Category.class)) {
			return new Category();
		} else {
			return null;
		}
	}
}
